build: add --add-version-header flag to build_changelog.py#1179
Merged
build: add --add-version-header flag to build_changelog.py#1179
Conversation
Add optional flag to prepend version header and adjust heading levels, useful for projects that want to include changelogs in their docs with proper heading hierarchy. When enabled: - Adds '# vX.Y.Z' header at the top - Adjusts '# Contributors' to '## Contributors' - Adjusts '# Changelog' to '## Changelog' This keeps the default behavior unchanged while allowing docs-oriented projects (like gptme) to generate properly formatted release notes.
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 04df7a1 in 1 minute and 31 seconds. Click for details.
- Reviewed
45lines of code in1files - Skipped
0files when reviewing. - Skipped posting
4draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. scripts/build_changelog.py:67
- Draft comment:
New '--add-version-header' flag added to argparse. The help text is clear, but ensure documentation elsewhere explains its effect. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. scripts/build_changelog.py:96
- Draft comment:
The flag is correctly passed to the build() function via add_version_header; no issues here. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
3. scripts/build_changelog.py:362
- Draft comment:
The build() function signature now includes the new parameter 'add_version_header' with a default value of False. This integration is straightforward. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
4. scripts/build_changelog.py:435
- Draft comment:
In the add_version_header block, version header prepending and heading adjustments are done via simple string replacement. Consider using regex to handle potential variations in whitespace or formatting for '# Contributors' and '# Changelog'. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% While regex could handle more variations in whitespace, the current approach is actually quite reasonable since: 1. The headings being replaced are generated by the same code, so their format is consistent 2. The current code is simpler and more readable 3. There's no evidence of whitespace variation being a real issue 4. The code already works reliably The suggestion could make the code more robust against potential edge cases with whitespace variations. The current approach might break if the heading format changes. Since the headings are generated by this same code, not user input, whitespace variations aren't a real concern. The simpler string.replace() approach is more maintainable. The comment should be deleted. The current implementation is appropriate for the controlled environment where the headings are generated by the same code.
Workflow ID: wflow_lYb4o8VvmreFdKpU
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
ErikBjare
added a commit
to gptme/gptme
that referenced
this pull request
Oct 2, 2025
The --add-version-header feature has been merged into ActivityWatch upstream (ActivityWatch/activitywatch#1179), so we can go back to downloading the script instead of maintaining our own version.
Skogix
pushed a commit
to SkogAI/gptme
that referenced
this pull request
Dec 12, 2025
The --add-version-header feature has been merged into ActivityWatch upstream (ActivityWatch/activitywatch#1179), so we can go back to downloading the script instead of maintaining our own version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add optional flag to prepend version header and adjust heading levels, useful for projects that want to include changelogs in their docs with proper heading hierarchy.
Changes
When
--add-version-headeris enabled:# vX.Y.Zheader at the top# Contributorsto## Contributors# Changelogto## ChangelogMotivation
This keeps the default behavior unchanged while allowing docs-oriented projects (like gptme) to generate properly formatted release notes that integrate well with Sphinx/RST documentation.
The flag is opt-in and doesn't affect ActivityWatch's existing changelog generation workflow.
Important
Adds
--add-version-headerflag tobuild_changelog.pyto prepend version header and adjust heading levels for documentation integration.--add-version-headerflag tobuild_changelog.pyto prepend# vX.Y.Zheader and adjust heading levels.# Contributorsto## Contributorsand# Changelogto## Changelogwhen flag is used.main()to parse--add-version-headerflag and pass it tobuild().build()to apply header and heading adjustments based onadd_version_headerflag.This description was created by
for 04df7a1. You can customize this summary. It will automatically update as commits are pushed.